<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@  taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>收货地址</title>
<link rel="stylesheet" href="static/css/dd-index6.css" />
<script type="text/javascript" src="static/js/jquery-3.1.0.js"></script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsps/dd/dd_home.jsp">
		<jsp:param value="0" name="index" />
	</jsp:include>
	<div class="gg">
		<div class="xz">
			<input type="button" value="新增收货地址" id="add1"
				style="width: 114px; height: 30px; font-weight: bold; margin-top: 9px; margin-left: 30px;" />
			<span style="font-size: 12px; color: gray;">您已创建1 个收货地址，最多可创建<span
				style="font-size: 12px; color: #71B247;">20</span>个
			</span>
		</div>
		
		<div class="addresslist">
			<jsp:include page="/WEB-INF/jsps/addresslist.jsp">
				<jsp:param value="" name=""/>
			</jsp:include>
		</div>

		<div class="xz">
			<input type="button" value="新增收货地址" id="add2"
				style="width: 114px; height: 30px; font-weight: bold; margin-top: 9px; margin-left: 30px;" />
			<span style="font-size: 12px; color: gray;">您已创建1 个收货地址，最多可创建<span
				style="font-size: 12px; color: #71B247;">20</span>个
			</span>
		</div>

	</div>
	<div id="deng"></div>
	<div class="addxin">
		<div class="xintitle">
			新增收货地址<span class="cha">X</span>
		</div>
		<div class="xinnei">
			<form method="post" action="">
				<div class="xiala">
					<span>地区</span><select id="sheng" name="sheng"></select> <select
						id="shi" name="shi"></select> <select id="qu" name="qu"></select>
				</div>
				<div class="shouhuorena">
					<span>收货人</span><input type="text" name="shr" />
				</div>
				<div class="xidiz">
					<span>详细地址</span><input type="text" name="xiangzi" />
				</div>
				<div class="addphon">
					<span>手机号码</span><input type="text" name="shouji" />
				</div>
				<div class="btonn">
					<input type="submit" value="保存新增地址" id="baocun" />
				</div>
			</form>
		</div>
	</div>
	<script src="static/js/shengshiqu.js"></script>
	<script type="text/javascript">
	new PCAS("sheng", "shi", "qu", "湖南省", "株洲市", "醴陵市");
		$('#add1,#add2').click(
				function() {
					$('#deng').css({
						"display" : "block"
					});
					$('.addxin').css("display", "block").find('.xintitle')
							.find('.cha').click(function() {
								$('.addxin').css("display", "none");
								$('#deng').css({
									"display" : "none"
								});
							});
				});
		function getValue() {
			var getpro = document.getElementById("sheng").value;
			var getcity = document.getElementById("shi").value;
			var getarea = document.getElementById("qu").value;
		}
		
		$('#baocun').click(function(){
			var shuor=$('input[name=shr]').val();
			var xiadi=$('input[name=xiangzi]').val();
			var phonea=$('input[name=shouji]').val();
			var ss=$('select[name=sheng]').val();
			var shi=$('select[name=shi]').val();
			var qq=$('select[name=qu]').val();
			//拼接省市区
			var ssq = ss+" "+shi+" "+qq;
			
			$('.addresslist').load("index6_addadreess?shuor="+shuor+
					"&xiadi="+xiadi+"&phonea="+phonea+"&ssq="+ssq,
					null,function(){});
			
		});

	</script>
</body>
</html>